import pymysql


class mysql_opt(object):

    @staticmethod
    def get_conn():
        conn = pymysql.connect(
            host='localhost',
            user='root',
            # 记得密码
            password='Mysqlroot',
            database='waimaiyuan',
            port=3306
        )
        return conn, conn.cursor()

